//
//  UILabel + Extention.swift
//  微博09项目
//
//  Created by mac on 15/9/8.
//  Copyright © 2015年 itcast. All rights reserved.
//

import UIKit

extension UILabel{
    
    convenience init(title:String?,color:UIColor,fontSize:CGFloat,layoutWidth:CGFloat = 0){
        //实例化当前对象
        self.init()
        text = title
        textColor = color
        font = UIFont.systemFontOfSize(fontSize)
        if layoutWidth > 0{
            preferredMaxLayoutWidth = layoutWidth
            numberOfLines = 0
        }
        sizeToFit()
    }
}
